<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>赋值运算符</title>
</head>
<body>
    <button onclick="funA()">+=</button>
    <button onclick="funB()">-=</button>
    <button>*=</button>
    <button>/*</button>
    <button>**=</button>
    <button onclick="funK()">逻辑赋值</button>
</body>
<script>
    var a = 5 // 赋值运算符你
    function funA(){
        //相当于 a = a+5
        a += 5
        console.log(a)
    }

    function funB(){
        a -= 2 // 相当于 a = a-2
        console.log(a)
    }
    function funK(){
        var a = true
        a &&= false
        console.log(a)
    }
</script>
</html>